package com.fr.report.web.ui.container;

import com.fr.base.ArrayUtils;
import com.fr.report.web.ui.Widget;
import com.fr.report.web.ui.layout.AbsoluteLayout;
import com.fr.report.web.ui.layout.Layout;

public abstract class Container extends Widget
{
  public static final String XML_TAG = "Container";
  protected Layout layout;

  public Layout getLayout()
  {
    return this.layout;
  }

  public void setLayout(Layout paramLayout)
  {
    if (paramLayout == null)
      paramLayout = new AbsoluteLayout();
    this.layout = paramLayout;
  }

  public boolean isEditor()
  {
    return false;
  }

  public String[] supportedEvents()
  {
    return ArrayUtils.EMPTY_STRING_ARRAY;
  }

  public void addWidget(Widget paramWidget, Object paramObject)
  {
    this.layout.addLayoutWidget(paramWidget, paramObject);
  }

  public void addWidget(Widget paramWidget)
  {
    addWidget(paramWidget, null);
  }
}